package com.hhl.flower.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hhl.flower.pojo.entity.Collections;
import com.hhl.flower.pojo.entity.Flower;

import java.util.List;

/**
* @author Liubuzhu
* @description 针对表【collection】的数据库操作Service
* @createDate 2024-06-12 14:38:31
*/
public interface CollectionService extends IService<Collections> {
	/**
	 * 获取用户收藏列表
	 * @param userId
	 * @return
	 */
	List<Flower> listCollectionFlower(Integer userId);

	/**
	 * 用户收藏/取消收藏花
	 * @param status
	 * @param flowerId
	 * @param userId
	 */
	void likeOrCancel(Boolean status, Integer flowerId, Integer userId);

	/**
	 * 判断用户是否收藏花
	 * @param flowerId
	 * @param userId
	 * @return
	 */
	Boolean isCollection(Integer flowerId, Integer userId);

}
